package com.ywm.eduService.controller;

import com.ywm.commonUtil.R;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@Api("讲师登录模块")
@RestController
//@CrossOrigin
@RequestMapping("/eduService/user")
public class EduLoginController {

    @RequestMapping("/login")
    public R Login(){
        return R.ok().data("token","admin");
    }

    @GetMapping("/info")
    public R info(){
        String url="https://ss0.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=2436704584,446440853&fm=23&gp=0.jpg";
        return R.ok().data("roles","[admin]").data("name","admin").data("avatar",url);
    }
}
